#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "framework/FWDisplayObject.h"

#import "PIRecurrance.h"


enum PISensitivityType {
    PISensitivityTypeNone = -1,
    PISensitivityTypeNormal = 0,
    PISensitivityTypePersonal = 1,
    PISensitivityTypePrivate = 2,
    PISensitivityTypeConfidential = 3
};


@interface PIObject : FWDisplayObject
{
    BOOL native;
    BOOL augmented;
    
    NSString* title;
    NSString* icon;

    NSDate* startDate;
    NSTimeInterval startDateRaw;
    
    NSString* calendar;
    NSString* calendarIcon;
    UIColor* calendarColor;

    BOOL repeating;
    PIRecurrance* recurrance;

    PISensitivityType sensitivity;
    
    NSArray* alarms;

    NSString* notes;
}

@property (readonly, getter=isNative) BOOL native;

@property (assign, getter=isAugmented) BOOL augmented;

@property (readonly) NSString* title;
@property (readonly) NSString* icon;

@property (retain) NSDate* startDate;
@property (readonly) NSTimeInterval startDateRaw;

@property (readonly) NSString* calendar;
@property (readonly) NSString* calendarIcon;
@property (readonly) UIColor* calendarColor;

@property (readwrite, assign, getter=isRepeating) BOOL repeating;
@property (retain) PIRecurrance* recurrance;

@property (readwrite, assign) PISensitivityType sensitivity;

@property (retain) NSArray* alarms;

@property (retain) NSArray* tags;

@property (readwrite, retain) NSString* notes;


- (NSString*)notesSummary;

@end


@interface NSArray (PIObject)

- (id)piObjectForKey:(NSString*)key;

@end


